The present invention relates generally to medical imaging systems, and more particularly to an apparatus and method for implementing pre-designed state models for operation of real-time controllers within an X-ray imaging system.
X-ray imaging systems contain real-time controllers, which are built to control distributed hardware components within an X-ray imaging system. The hardware components are controlled in real-time. X-ray imaging systems are used for various applications having varying degrees of complexity. For example, an X-ray application such as a Digital Subtraction Angiography (DSA) is considered a more complex application and is performed by coordinating the operation of multiple real-time controllers.
Real-time controllers vary in scope depending upon the application, the X-ray imaging system, and the function to be performed. They are designed and implemented independently to perform the various functions such as X-ray generation, patient positioning, image acquisition, and image processing. Real-time controllers are required to provide coordination of runtime activities, and may be required to satisfy timing and performance constraints such as in Vascular and Radiography and Fluoroscopy X-ray applications.
Behavior of real-time controllers is traditionally specified as a state machine, which can be described by a state model. State machines describe how a real-time controller responds to stimuli received from the X-ray system in the form of events. The state machines are implemented using handwritten code. Writing of the code is a labor-intensive process that tends to be error-prone. Also, it is very difficult to ensure that the implementation of the state machines matches designed specifications.
Therefore, it would be desirable to provide an apparatus and method for implementing of state machines that is less labor-intensive than the current art and is also less error-prone. The apparatus and method may provide a more accurate implementation as to better match design specifications.
The foregoing and other advantages are provided by an apparatus and method for implementing pre-designed state models for operation of real-time controllers within an X-ray imaging system. A method for implementing a pre-designed state model is provided including extracting state information from the state model. The extracted state information is processed to generate a state code and a state table. The state code is compiled to generate a runtime code. The runtime code is used in combination with the state table to implement the state model.
A state processor for generating a state table and a runtime code for use in implementing of one or more pre-designed state models is also provided. The state processor includes a state model information provider, a state information separator, and a compiler. The state model information provider extracts state model information in response to the one or more state models. The state information separator generates a state code and the state table in response to the one or more state models. The compiler compiles the state code and generates the runtime code.
One of several advantages of the present invention is that it provides designers with versatility as to alter and automatically update code at any time.
Another advantage of the present invention is that use of a state model provides hierarchically organized states, in turn providing improved scalability and understandability of state models.
Furthermore, generic components are provided that implement event handling and state transitions. This allows state machines to be modified without altering basic functions performed by the controller.
Moreover, the present invention provides communication and cooperation between separate state machines. This also provides increased versatility.
The present invention through the use of state model diagrams and an automated process provides increased performance and is less error prone.
The present invention itself, together with attendant advantages, will be best understood by reference to the following detailed description, taken in conjunction with the accompanying figures.